import { NextRequest, NextResponse } from 'next/server';
import { verifyLicense } from '@/utils/licenseUtils';

export async function GET(request: NextRequest) {
  const status = await verifyLicense();
  return NextResponse.json({
    status: status.valid ? 200 : 403,
    message: status.valid ? '授权有效' : `未授权：${status.reason}`,
    data: status
  }, { status: status.valid ? 200 : 403 });
}
